.TH GPTLprint_memusage 3 "May, 2020" "GPTL"

.SH NAME
GPTLprint_memusage \- Print current memory usage info (MB)

.SH SYNOPSIS
.B C/C++ Interface:
.nf
#include <gptl.h>
int GPTLprint_memusage (const char *str);
.fi

.B Fortran Interface:
.nf
use gptl
integer gptlprint_memusage (character(len=*) str)
.fi

.SH DESCRIPTION
.B GPTLprint_memusage
prints information about current memory usage of the process in units of MB.

.SH ARGUMENTS
.I str
-- input string gets printed ahead of the other information. Normally used
as a tag to identify where in the code the call was made.

.SH RESTRICTIONS
None

.SH RETURN VALUE
On success, this function returns 0.
On error, -1 is returned.

.SH EXAMPLES
.nf         
.if t .ft CW
...
ret = GPTLprint_memusage ("start");  // print memory usage info at program start
ret = do_work();
ret = GPTLprint_memusage ("end");    // print memory usage info at program end

.if t .ft P
.fi

.SH SEE ALSO
.BR GPTLget_memusage "(3)" 
